﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NGinnBPM.Lib.Interfaces.Worklist
{
    /// <summary>
    /// User and org structure information repository
    /// </summary>
    [System.ServiceModel.ServiceContract]
    public interface IUserDataRepository
    {
        [System.ServiceModel.OperationContract]
        bool IsValidResourceId(string rcId);

        [System.ServiceModel.OperationContract]
        string SelectPerson(string query);

        /// <summary>
        /// Selects a group using given criteria:
        /// Examples:
        /// root=3829 - select group 3829
        /// root=group:3829 - select group 3829
        /// root=user:123, relations=DefaultGroup - select DefaultGroup of user 123
        /// root=user:123, relations=OrgUnit - select org unit of user 123
        /// user:123.Supervisor
        /// group:alala.Members.
        /// </summary>
        /// <param name="root"></param>
        /// <param name="relations"></param>
        /// <returns></returns>
        [System.ServiceModel.OperationContract]
        string SelectGroup(string query);
    }
}
